package com.jboost.hyk.common.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jboost.hyk.common.entity.BusinessLibrary;
import com.jboost.hyk.common.model.BusinessLibraryPurchasedPoint;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 机构知识
 * @Author: cxn
 * @Date:   2022-11-07
 * @Version: V1.0
 */
public interface BusinessLibraryMapper extends BaseMapper<BusinessLibrary> {

    List<BusinessLibrary> pageBy(Page<BusinessLibrary> page, String businessId, String name, String category2Id, String category3Id, String teacherId, String status, String type);

    List<String> findTeacherByLibraryName(String businessId, String name);

    Integer countPurchasedBy(String [] pointIds, String businessId);

    List<BusinessLibraryPurchasedPoint> countPurchasedKp(String[] libraryIds, String businessId);

    List<BusinessLibrary> findByLibrarySnapshotIds(String[] snapshotIds);

    void setNullInvalidTime(String id);
}
